package com.haoshuang.zhouzhoubang.ui.dialog

import android.content.Context
import android.view.View
import android.widget.ImageView
import com.haoshuang.zhouzhoubang.R

import com.lxj.xpopup.core.BottomPopupView

/** 自定义底部分享弹窗 */
class CustomBottomSharePopup(context: Context, val block: (id: Int) -> Unit) : BottomPopupView(context) {
    override fun getImplLayoutId(): Int {
        return R.layout.custom_bottom_popup
    }

    override fun onCreate() {
        super.onCreate()
        findViewById<ImageView>(R.id.ivBottomPopWX).setOnClickListener {
            block(R.id.ivBottomPopWX)
        }
        findViewById<ImageView>(R.id.ivBottomPopWXMoments).setOnClickListener {
            block(R.id.ivBottomPopWXMoments)
        }
        findViewById<ImageView>(R.id.ivBottomPopCancel).setOnClickListener {
            dismiss()
        }

    }

    // 最大高度为Window的0.85

}